<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <body>

        <ui:composition template="./mainTemplate.xhtml">

            <ui:define name="menuServerWork">
                <li><a href="#" onClick="menuUpAndDown(this);">
                        Praca serwera <img src="resources/images/dyn_down.gif" alt="Ukryj" /></a>
                    <ul class="submenu">
                        <li><h:outputLink value="/ISA/view/dashboard.xhtml">Podstawowe informacje</h:outputLink></li>
                        <li><h:outputLink value="/ISA/view/requestList.xhtml">Aktywne zapytania do serwera</h:outputLink></li>
                        <li><h:outputLink value="/ISA/view/WPList.xhtml">Procesy robocze</h:outputLink></li>
                    </ul>
                </li>
            </ui:define>

            <ui:define name="content">
                <ul id="dashboard">
                    <h:form>
                        <li>
                            <p:commandLink update="growl" styleClass="start" onclick="loadingStart(this);" 
                                           oncomplete="loadingStop('start');"
                                           actionListener="#{sSRControl.start}" value="Wystartuj serwer" />  
                        </li>
                        <li>
                            <p:commandLink update="growl" styleClass="stop" onclick="loadingStart(this);" 
                                           oncomplete="loadingStop('stop');" 
                                           actionListener="#{sSRControl.stop}" value="Zatrzymaj serwer" /> 
                        </li>
                        <li>
                            <p:commandLink update="growl" styleClass="restart" onclick="loadingStart(this);" 
                                           oncomplete="loadingStop('restart');" 
                                           actionListener="#{sSRControl.restart}" value="Restartuj serwer" /> 
                        </li>
                        <li>
                            <a class="info" href="/ISA/view/dashboard.xhtml">Podstawowe informacje</a>
                        </li>
                        <li>
                            <a class="pageslist" href="/ISA/view/sitesList.xhtml">Strony</a>
                        </li>
                        <li>
                            <a class="folder" href="/ISA/view/vDirList.xhtml">Wirtualne foldery</a>
                        </li>
                        <li>
                            <a class="apps" href="/ISA/view/applicationsList.xhtml">Aplikacje</a>
                        </li>
                        <li>
                            <a class="appsgroup" href="/ISA/view/appPoolsList.xhtml">Grupy aplikacji</a>
                        </li>
                        <li>
                            <a class="settings" href="/ISA/view/modulesList.xhtml">Moduły</a>
                        </li>
                        <li>
                            <a class="backup" href="/ISA/view/backupList.xhtml">Backup konfiguracji</a>
                        </li>
                    </h:form>
                    <script>
                        function loadingStart(element) {
                            jQuery(element).attr('class', 'loaderDashBoard');
                        }
                        function loadingStop(className) {
                            jQuery('a.loaderDashBoard').attr('class', className);
                        }
                    </script>
                </ul>
            </ui:define>

        </ui:composition>

    </body>
</html>
